31 de julho de 2018

Code

library(ggplot2)
library(forecast)
library(plotly)

# Colour theme
theme_set(theme_classic())

# Subset data
nottem_small <- window(nottem, start=c(1920, 1), end=c(1925, 12))

# ggplot
gg <- ggseasonplot(AirPassengers) + labs(title="International Airline Passengers")

Plotly

# plotly
ggplotly(gg)